package com.lagou.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Calendar;

/**
 * @Description 类功能描述
 * @Author 郭汝诚
 * @Date 2020/6/21 14:04
 * @Version 1.0
 **/
@Controller
public class LoginController {

    /**
     * 获取并封装当前年份，并跳转登录页login.html
     */
    @RequestMapping("/toLoginPage")
    public String toLoginPage(Model model) {
        model.addAttribute("currentYear", Calendar.getInstance().get(Calendar.YEAR));
        return "login";
    }

}
